package kr.hkit.androidcomplete01.ch05;

import kr.hkit.androidcomplete01.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class FrameEx extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch05_frameex);
		
		Button btn = (Button) findViewById(R.id.btn);
		btn.setOnClickListener(new Button.OnClickListener(){

			@Override
			public void onClick(View v) {
				ImageView img = (ImageView) findViewById(R.id.img);
				if(img.getVisibility() == View.VISIBLE){
					img.setVisibility(View.INVISIBLE);
				}else{
					img.setVisibility(View.VISIBLE);
				}
			}
		});
	}
}
